<template>
    <div class="layerRtb layerRtb-threecolumn">
        <three-title :title="{name:'积分处理'}"></three-title>
        <div class="layerRtb-scroll thinScroll" v-scrollHeight="437">

            <div class="analyItem">
                <p class="analyItemTit tx-center">普级积分</p>
                <div class="analyItemCon">
                    <p class="col-md-6">时间：
                        <span class="cLightGray pr8"></span>
                    </p>
                    <p class="col-md-6">积分：
                        <span class="cLightGray pr8"></span>
                    </p>
                </div>
            </div>
<!--             <div class="analyItem">
                <p class="analyItemTit tx-center">培训时间</p>
                <div class="analyItemCon">
                    <p class="col-md-6">时间：
                        <span class="cLightGray pr8"></span>
                    </p>
                    <p class="col-md-6">积分：
                        <span class="cLightGray pr8"></span>
                    </p>
                    <p class="col-md-12">
                        <span class="cLightGray pr8"></span></p>
                </div>
            </div> -->
                <div class="analyItem">
                <p class="analyItemTit tx-center">现持有分</p>
                <div class="analyItemCon">
                    <p class="col-md-6">初始分
                        <span class="cLightGray pr8">60分</span>
                    </p>
                    <p class="col-md-6">现有
                        <span class="cLightGray pr8">60分</span>
                    </p>
                </div>
            </div>
        </div>

        <div class="layerRtb-footer">
              <div class="analyItem">
                <p class="analyItemTit tx-center">通知</p>
                <div class="analyItemCon">
                        <p class="col-md-12">
                             <span>您当前持有60积分，距离消分培训还有60积分，继续加油</span>
                            <span></span>
                        </p>
                </div>
            </div>
        </div>
    </div>
</template>
<script>
import { mapGetters } from 'vuex'
import { getDepositDetail } from '../../Resources/Api/index'
import rxHistory from './history/rejecteHistory'
export default {
    components: {
        rxHistory
    },
    data () {
        return {
            rejectUser: [],
            fourIndex: undefined
        }
    },
    created () {
        this.GetDeposit()
    },
    methods: {
        GetDeposit () {
            let _this = this
            _this.rejectUser = []
            getDepositDetail({
                uId: _this.leftInfo.uid,
                flag: 1, /* 拒单 */
                cuurentMonth: '2'
            }).then(results => {
                _this.rejectUser = results.data.Body
                if (_this.rejectUser == null) {
                    _this.rejectUser = []
                }
            }).catch(error => {
                console.log(error)
            })
        },
        clickFourShow (index) {
            this.fourIndex = index
        }
    },
    computed: {
        ...mapGetters(['leftInfo']),
        compluedTask () {
            return this.rejectUser.map(item => item.pmIntegral).reduce((acc, cur) => (cur + acc), 0)
        }
    },
    watch: {
        leftInfo () {
            this.GetDeposit()
        }
    }
}

</script>
